package com.xinghai.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xinghai.system.domain.XhVehicleInfoMaterial;
import com.xinghai.system.domain.dto.DeviceDetailDTO;
import com.xinghai.system.domain.vo.XhStaticsReportQueryVo;
import com.xinghai.system.domain.vo.XhVehicleInfoMaterialVO;

import java.net.UnknownHostException;
import java.util.List;

/**
 * 用车耗材明细Service接口
 * 
 * @author smy
 * @date 2024-07-25
 */

public interface IXhVehicleInfoMaterialService extends IService<XhVehicleInfoMaterial>
{
    /**
     * 查询用车耗材明细
     * 
     * @param id 用车耗材明细主键
     * @return 用车耗材明细
     */
    public XhVehicleInfoMaterial getInfo(Long id);

    /**
     * 查询用车耗材明细列表
     * 
     * @param xhVehicleInfoMaterial 用车耗材明细
     * @return 用车耗材明细集合
     */
    public List<XhVehicleInfoMaterial> list(XhVehicleInfoMaterial xhVehicleInfoMaterial);

    /**
     * 新增用车耗材明细
     * 
     * @param xhVehicleInfoMaterial 用车耗材明细
     * @return 结果
     */
    public int insert(XhVehicleInfoMaterial xhVehicleInfoMaterial);

    /**
     * 批量新增用车耗材明细
     *
     * @param xhVehicleInfoMaterialList 用车耗材明细信息集合
     * @return 结果
     */
    public int insertBatch(List<XhVehicleInfoMaterial> xhVehicleInfoMaterialList);

    /**
     * 修改用车耗材明细
     * 
     * @param xhVehicleInfoMaterial 用车耗材明细
     * @return 结果
     */
    public int update(XhVehicleInfoMaterial xhVehicleInfoMaterial);

    /**
     * 批量删除用车耗材明细
     * 
     * @param ids 需要删除的用车耗材明细主键集合
     * @return 结果
     */
    public int deleteBatch(Long[] ids);

    /**
     * 删除用车耗材明细信息
     * 
     * @param id 用车耗材明细主键
     * @return 结果
     */
    public int delete(Long id);

    /**
     * 导入用车耗材明细信息
     *
     * @param xhVehicleInfoMaterial 用车耗材明细信息集合
     * @return 结果
     */
    public boolean importData(List<XhVehicleInfoMaterial> xhVehicleInfoMaterial);

    /**
     * 发送评论并保存耗材
     * @param xhVehicleInfoMaterial
     * @return
     */
    public boolean saveList(XhVehicleInfoMaterialVO xhVehicleInfoMaterial) throws UnknownHostException;

    Boolean saveBatchMateial(XhVehicleInfoMaterialVO xhVehicleInfoMaterialVO);

    List<XhVehicleInfoMaterial> getMaterialList(Long vehicleId);

    List<DeviceDetailDTO> deviceDetailPage(XhStaticsReportQueryVo xhStaticsReportQueryVo);

    public int importMaterial(List<XhVehicleInfoMaterial> list);
}
